<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
.b .a { background-color: red; }
</style>
<div class="b"><div class="a">You should see no red.</div></div>
<script>
description("Removing a class affected by a selector.");

document.body.offsetLeft; // force style recalc
document.getElementsByTagName("div")[1].className = "";
shouldBe("getComputedStyle(document.getElementsByTagName('div')[1], null).backgroundColor", "'rgba(0, 0, 0, 0)'");
</script>
